package com.bobbygu.server.simpleapp.mapper;

import com.bobbygu.server.simpleapp.model.UserModel;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface UserMapper {
    @Select("select * from user where user = #{user}")
    UserModel findUserByname(String user);

    @Insert("insert into user(user, password,token) values(#{user}, #{password}, #{token})")
    void register(@Param("user") String user, @Param("password") String password, @Param("token") String token);
}
